import QueryFilter from "@/components/QueryFilter"
import Toolbar from "@/components/Toolbar"
import useAntdList from "@/hooks/useAntdList"
import { queryAccount, queryNoticeList } from "@/service/globalSetting"
import { Button, Form, Input, Space, Table, Tabs } from "antd"
import Card from "antd/lib/card/Card"

const App = ()=>{
const [form] = Form.useForm();
    const {tableProps,search} = useAntdList(queryNoticeList,{form})
const columns = [
    {
        title:'项目ID',
        dataIndex:''
    }, {
        title:'项目名称',
        dataIndex:''
    }, {
        title:'当前版本',
        dataIndex:''
    },  {
        title:'操作',
        render(){
            return <Space>
                <Button type='link'>部署</Button>
                <Button type='link'>切换版本</Button>
                <Button type='link'>编辑</Button>
            </Space>
        }
        // dataIndex:''
    }

]
return <Card>
    <QueryFilter form={form} submit={search.submit} reset={search.reset} >
        <Form.Item label='应用名称' name='name'>
            <Input/>
        </Form.Item>
        </QueryFilter>
        
        <Toolbar
        leftRender={<Button>新建应用</Button>}
        />
        <Tabs
        items={[{
            key:'dev',
            label:'开发环境'
        },{
            key:'test',
            label:'测试环境'
        }]}
        />
    <Table columns={columns} {...tableProps}/>
</Card>
}
export default App